package com.redoor.app.stake.basicdata.service;

import com.redoor.app.stake.basicdata.model.BaseRegistration;
import com.redoor.app.stake.basicdata.model.controllerModel.BaseRegistrationCriteria;
import com.redoor.app.stake.basicdata.model.serviceModel.BaseRegistrationServiceBean;
import com.redoornetwork.framework.mybatis.service.Service;
import com.yotouch.app.stake.model.Registration;

import java.util.List;

/**
 * Created by wangjunlei on 2018-03-09 10:22:50.
 */
public interface BaseRegistrationService extends Service<BaseRegistration, String> {

    /**
     * 注册码审核通过
     * @param acceptedAmount    接受数量
    * @param registrationUUid   注册码申请表主键
     * @param reviewSuggestion  审核意见
     * @return
     */
    public int accept(int acceptedAmount,String registrationUUid,String reviewSuggestion);

    /**
     * 拒绝注册码申请
     * @param registrationUUid  注册码申请表主键
     * @param reviewSuggestion  审核意见
     * @return
     */
    public int reject(String registrationUUid,String reviewSuggestion);

    /**
     * 批量创建注册码
     * @param list
     * @return
     */
    public int insertBatch(List<BaseRegistration> list);

    /**
     * 查询注册码
     * @param criteria
     * @return
     */
    public List<BaseRegistration> queryRegistration(BaseRegistrationCriteria criteria);

    /**
     * 根据注册码编号查询一条注册码记录--HSF接口中使用
     * @param number
     * @return
     */
    public BaseRegistration getRegistrationByNumber(String number);

    /**
     * 根据注册码获取注册码主键
     * @param number
     * @return
     */
    public String getRegistrationUuidByNumber(String number);

    /**
     * 根据主键查找
     * @param uuid
     * @return
     */
    public BaseRegistration getRegistrationByUuid(String uuid);

    public String genAuthCode(String fingerprint, String regCode, String stakeNo);
    /**
     * 注册码展示页面数据
     * @Author zhangYiHang
     * @Date 2018/3/15 20:08
     */
    List<BaseRegistrationServiceBean> qryRegistrationList(BaseRegistrationCriteria criteria);
    /**
     * 注册码展示页面总条数
     * @Author zhangYiHang
     * @Date 2018/3/15 20:08
     */
    int qryRegistrationTotal(BaseRegistrationCriteria criteria);

    public List<Registration> queryHsfRegistration(String registrationApplyUuid);
}
